{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "3754c9cc",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "图像形状[Width,Height,Channels(Depth)]: (320, 800, 3)\n",
      "图像所有的像素总个数: 768000 . Weight*Height*Channels = 768000\n",
      "图像像素值的类型: uint8\n"
     ]
    }
   ],
   "source": [
    "import cv2 as cv\n",
    "\n",
    "img = cv.imread('../data/GiteeOrGithub.jpeg')\n",
    "if img is None:\n",
    "    print(\"[ERROR] fail to read Image!!!\")\n",
    "    exit(0)\n",
    "cv.imshow(\"pic\", img)\n",
    "cv.waitKey(0);\n",
    "\n",
    "print( '图像形状[Width,Height,Channels(Depth)]:',\n",
    "      img.shape )\n",
    "print( '图像所有的像素总个数:', \n",
    "      img.size, '. Weight*Height*Channels =', \n",
    "      img.shape[0]*img.shape[1]*img.shape[2] )\n",
    "print( '图像像素值的类型:',\n",
    "      img.dtype )\n",
    "\n",
    "cv.destroyAllWindows()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5d6938b5",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
